package com.zy.openchat.core.model.user;

import android.text.TextUtils;

import com.ja.openchat.R;
import com.zy.openchat.App;

public class UserMyInfo {
    public boolean hasPassword;
    public int gender;
    public String birth;
    public String country;
    public String countryCode;
    public String province;
    public String city;
    public String cityCode;

    public UserMyInfo() {
    }

    public UserMyInfo(int gender, String birth, String country, String countryCode, String province, String city, String cityCode) {
        this.gender = gender;
        this.birth = birth;
        this.country = country;
        this.countryCode = countryCode;
        this.province = province;
        this.city = city;
        this.cityCode = cityCode;
    }

    public String getAddress(){
        String name = App.getInstanse().getString(R.string.china_text);
        if("86".equals(countryCode)||"CN".equals(countryCode)){
            if(!TextUtils.isEmpty(province)){
                name = province;
            }
            if(!TextUtils.isEmpty(city)){
                name = name+"-"+city;
            }
        }else{
            name = country;
        }
        return name;
    }
}
